<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/12.2.0/markdown-it.min.js"></script>-->
<script src="https://cdn.jsdelivr.net/npm/markdown-it@12.2.0/dist/markdown-it.min.js"></script>

<div id="markdownbox"></div>
<script>
  var md = window.markdownit()
    .disable(['link'])
    .enable(['link']);
  // md.disable(['link']);
  //如果关闭了link, 那么输出为↓ (也就是没有特殊含义 不会自动转为a标签
  //[Definition lists](https://github.com/markdown-it/markdown-it-deflist)
  // md.enable(['link']);

  var result = md.render('[Definition lists](https://github.com/markdown-it/markdown-it-deflist)');

  console.log('result:',result);
  //result: <p><a href="https://github.com/markdown-it/markdown-it-deflist">Definition lists</a></p>
  markdownbox.innerHTML = result;
</script>
</body>
</html>
